#!/usr/bin/python
# -*- coding:utf8 -*-

import urllib2

class HtmlDownloader(object):


    def download(self, url):
        print("进来了downloader")
        if url is None:
            return None

        response = urllib2.urlopen(url)

        # 如果请求失败
        if response.getcode() != 200:

            return None

        print("下载成功")
        return response.read()
